<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cookie表单信息保留</title>
<meta content="" name="description">
<script type="text/javascript" src="/j-tool/jquery.js"></script>
<script type="text/javascript" src="/j-tool/jq_cookie.js"></script>
<script>
	jQuery(function(){
		var Cookie = new $.cookie;
			Cookie.Init(1*60*60*24*30,'pic.dev','/');
		$('#word').html(Cookie.Get('name'));
		$('.btn').click(function(){
			var val = $('input[name=name]').val();
			if(val)
			{
				Cookie.Set('name',val);
			}
		})
	})	
</script>
<body>
	<form action="" method="post"/>
	<input type="text" name="name"/>
	<button class='btn'>记录</button> 
	</form>
	<div id="word"></div>
</body>
</html>